package com.cl.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
/**
 * 配置文件
 * @author 390576
 *
 */
public class PropertiesUtil {

	private static Properties properties;
	private static String fileName = "config/config.properties";

	private PropertiesUtil() {
	}

	static {
		if (properties == null) {
			properties = new Properties();
		}
		try {
			properties.load(new FileInputStream(fileName));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String getProperties(String name) {
		return (String) properties.get(name);
	}

}
